package com.syni.mdd.yhd.common.all.service.impl.activity;

import com.syni.mdd.yhd.common.all.constants.Constants;
import com.syni.mdd.yhd.common.all.constants.ResultCode;
import com.syni.mdd.yhd.common.all.constants.ResultMsg;
import com.syni.mdd.yhd.common.all.dao.jpa.activity.BmsBackCardDao;
import com.syni.mdd.yhd.common.all.dao.jpa.activity.BmsMealUserHelpDao;
import com.syni.mdd.yhd.common.all.entity.BmsMealUserHelp;
import com.syni.mdd.yhd.common.all.entity.activity.BmsBackCard;
import com.syni.mdd.yhd.common.all.entity.activity.BmsDrLogic;
import com.syni.mdd.yhd.common.all.entity.activity.BmsDrOrderLog;
import com.syni.mdd.yhd.common.all.entity.activity.BmsUserOverMeal;
import com.syni.mdd.yhd.common.all.service.activity.BmsBackCardService;
import com.syni.mdd.yhd.common.all.service.activity.BmsDrLogicService;
import com.syni.mdd.yhd.common.all.service.activity.BmsDrOrderLogService;
import com.syni.mdd.yhd.common.all.service.activity.BmsMealUserHelpService;
import com.syni.mdd.yhd.common.all.service.impl.BaseService;
import com.syni.mdd.yhd.common.all.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;

/**
 * @className
 * @description TOO
 * @Author hwq
 * @DATE 2019/9/23 10:34
 * @VERSION 1.0
 **/
@Service
public class BmsMealUserHelpServiceImpl extends BaseService<BmsMealUserHelp, Integer> implements BmsMealUserHelpService {

    @Autowired
    BmsMealUserHelpDao bmsMealUserHelpDao;


    @Override
    public BmsMealUserHelpDao getBaseDao() {
        return bmsMealUserHelpDao;
    }

    @Override
    public void addUserHelpRecord(BmsUserOverMeal bmsUserOverMeal) {
        BmsMealUserHelp bmsMealUserHelp = new BmsMealUserHelp();
        bmsMealUserHelp.setUserId(bmsUserOverMeal.getUserId());
        bmsMealUserHelp.setNewTime(bmsUserOverMeal.getExtraUpdateTime());
        bmsMealUserHelpDao.save(bmsMealUserHelp);
    }
}
